#include <iostream>

using namespace std;

class Point {
public:
    Point(int xx = 0, int yy = 0) {
        X = xx;
        Y = yy;
    }

    Point(Point &p);

    int GetX() {
        return X;
    }

    int GetY() {
        return Y;
    }

    void SetX(int x) {
        X = x;
    }

    void SetY(int y) {
        Y = y;
    }

private:
    int X,Y;
};
Point::Point(Point &p) {
    X=p.X;
    Y=p.Y;
    cout<<"Copy constructor is called."<<endl;
}
Point Fun(Point p){
    Point p1;
    p1.SetX(p.GetX()+2);
    p1.SetY(p.GetY()+2);
    return p1;
}
int main(){
    Point A(1,2);
    Point B(A);
    Point C;
    C = Fun(A);
    cout << B.GetX()<<","<<B.GetY()<<endl;
    cout <<C.GetX()<<","<<C.GetY()<<endl;
}
